<template>
  <div>
    <h1>我是app组件</h1>
    {{count}}
    <Child @changeCount="changeCount"/>
  </div>
  
</template>

<script>
import Child from '@/components/Child'
export default {
  name:"App",
  components:{Child},
  data(){
    return{
      count:0,
    };
  },
 
  methods:{
    changeCount(value){
      console.log(value);
      this.count +=value;
    }
  }
}
</script>